﻿#include "ResizeWindowEventFilter.h"
#include<QEvent>

ResizeWindowEventFilter::ResizeWindowEventFilter(std::function<bool(QResizeEvent*)> fun, QObject* parent)
    :EventFilter([=](QEvent* ev)->bool {
    auto resize = static_cast<QResizeEvent*>(ev);
    return m_fun(resize);        //该事件已经被处理
        }, QEvent::Resize, parent),
    m_fun(fun)
{
}
